<?php

if (!defined('BASEPATH'))
	exit('No direct script access allowed');
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of model_attribute_info
 *
 * @author b4by
 */
class model_page_user extends MY_Model{
	var $table='page_user';
	
	public function get_registed_users($input)
	{
		$input['select'] = 'u.*';
		$this->get_list_set_input($input);
		$this->db->from('page_user p');
		$this->db->join('user u','u.id = p.user_id','left');
		$query = $this->db->get();
		return $query->result();
	}
	public function get_registed_pages($input)
	{
		$input['select'] = 'p.*';
		$this->get_list_set_input($input);
		$this->db->from('page_user pu');
		$this->db->join('page p','p.id = pu.page_id','left');
		$query = $this->db->get();
		return $query->result();
	}
}

?>
